mention-java-common-package
authorDebian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Wed, 1 Aug 2012 08:41:17 +0000 (08:41 +0000)
committerRene Engelhard <rene@debian.org>
Wed, 1 Aug 2012 08:41:17 +0000 (08:41 +0000)
===================================================================

Gbp-Pq: Name mention-java-common-package.diff

jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
svtools/source/java/javainteractionhandler.cxx

index 0432c11db4806f0872d660fbe8af52317d25d4e1..85beac4425eae36003f6ca1e06c9d52e9b7a2ecb 100644 (file)
@@ -170,6 +170,9 @@ static bool findAndSelect(JavaInfo ** ppInfo)
     if (errcode == JFW_E_NO_JAVA_FOUND)
     {
         fprintf(stderr,"javaldx: Could not find a Java Runtime Environment! \n");
+        fprintf(stderr,"Please ensure that a JVM and the package libreoffice-java-common\n");
+        fprintf(stderr,"is installed.\n");
+        fprintf(stderr,"If it is already installed then try removing ~/.libreoffice/3/user/config/javasettings_Linux_*.xml\n");
         return false;
     }
     else if (errcode != JFW_E_NONE && errcode != JFW_E_DIRECT_MODE)
index 61192de7568cfcda77145b24ed63ef1e48af6ff0..713dae2dd0704be7f96804c84ea7ed15cc9c7772 100644 (file)
 #include <svtools/javainteractionhandler.hxx>
 #include <svtools/javacontext.hxx>
 
+#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
+
 using namespace com::sun::star::uno;
 using namespace com::sun::star::task;
-
 namespace svt
 {
 
@@ -154,6 +155,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
             WarningBox aWarningBox( NULL, SvtResId( WARNINGBOX_INVALIDJAVASETTINGS ) );
             String aTitle( SvtResId(STR_WARNING_INVALIDJAVASETTINGS));
             aWarningBox.SetText( aTitle );
+            String aText = String(aWarningBox.GetMessText());
+            aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality."));
+            aWarningBox.SetMessText( aText );
             nResult = aWarningBox.Execute();
         }
         else
@@ -171,6 +175,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
             QueryBox aQueryBox( NULL, SvtResId( QBX_JAVADISABLED ) );
             String aTitle( SvtResId( STR_QUESTION_JAVADISABLED ) );
             aQueryBox.SetText( aTitle );
+            String aText = String(aQueryBox.GetMessText());
+            aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality."));
+            aQueryBox.SetMessText( aText );
             nResult = aQueryBox.Execute();
             if ( nResult == RET_YES )
             {
@@ -213,6 +220,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
             ErrorBox aErrorBox(NULL, SvtResId( ERRORBOX_RESTARTREQUIRED ) );
             String aTitle( SvtResId( STR_ERROR_RESTARTREQUIRED ) );
             aErrorBox.SetText( aTitle );
+            String aText = String(aErrorBox.GetMessText());
+            aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality."));
+            aErrorBox.SetMessText( aText );
             nResult = aErrorBox.Execute();
         }
         else